package com.gx.ring.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gx.ring.service.QueryInterfaceService;
import com.gx.ring.service.impl.QueryInterfaceImplService;

@Controller
@RequestMapping("/query")
public class QueryController {
	
	@ResponseBody
	@RequestMapping("querybyphnum.do")
	public String queryByPhNum(@RequestParam("option")String option,@RequestParam("phNumber")String phNumber){
		QueryInterfaceService qfs = new QueryInterfaceImplService();
		return qfs.qureyByphNumber(option, phNumber);
	}
	
	@ResponseBody
	@RequestMapping("querybycorpcode.do")
	public String queryByCorpNum(@RequestParam("option")String option,@RequestParam("corpCode")String corpCode){
		QueryInterfaceImplService qfs = new QueryInterfaceImplService();
		return qfs.queryByCorpCode(option, corpCode);
	}
	
}
